package efu.nf.like.common.base;

import efu.nf.like.common.result.ResultVo;
import org.springframework.http.HttpStatus;

/**
 * @author wangl
 * @date 2023/12/6
 */
public class BaseController {

    public<T> ResultVo<T> success() {
        ResultVo<T> vo = new ResultVo<>();
        vo.setCode(HttpStatus.OK.value());
        vo.setMessage("success");
        return vo;
    }

    public <T> ResultVo<T> success(T data) {
        ResultVo<T> vo = new ResultVo<>();
        vo.setCode(HttpStatus.OK.value());
        vo.setData(data);
        return vo;
    }

}